Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <body> <p>Search for an "e" in the next paragraph:</p> <p id="p01">The best things in life are free!</p> <button onclick="myFunction()">Try it</button> <p id="demo"></p> <script> function myFunction() { text = document.getElementById("p01").innerHTML; document.getElementById("demo").innerHTML = /e/.exec(text); } </script> </body> <!-- Mirrored from www.w3schools.com/js/tryit.asp?filename=tryjs_regexp_exec by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 07:36:04 GMT --> </html>
Result:
Try it Yourself - © w3schools.com